<?php
namespace StarCloud\Models\Doumvip;

use StarCloud\Models\Base;
use Phalcon\Db\Adapter\Pdo\Mysql;
use Phalcon\Di;

class BaseModel extends Base
{
    public function initialize()
    {
        $this->setConnectionService('money');
        parent::initialize();
    }

    public static function getDb() : Mysql
    {
        return Di::getDefault()->getShared('money');
    }

    public function hidden()
    {
        $this->hidden = 1;
        $this->save();
    }

    protected $hidden;
}